The QuickTime VR Manager provides routines that you can use to convert mathematical entities and perform other utility operations.
You can use the QTVRGetAngularUnits function to get the type of unit currently used when specifying angles.
QTVRAngularUnits QTVRGetAngularUnits (QTVRInstance qtvr);
The QTVRGetAngularUnits function returns, as its function result, a constant that indicates the type of angular unit currently used by the movie instance specified by the qtvr parameter. Angular values you pass to other QuickTime VR functions (for example, QTVRSetPanAngle ) are interpreted in those units.
You can use the QTVRSetAngularUnits function to set the type of unit used when specifying angles.
OSErr QTVRSetAngularUnits (QTVRInstance qtvr, QTVRAngularUnits units);
The QTVRSetAngularUnits function sets the type of angular units to be used in all subsequent QuickTime VR Manager calls for the QuickTime VR movie specified by the qtvr parameter to the unit type specified by the units parameter.
Use QTVRGetAngularUnits to get the type of angular unit used by a QuickTime VR movie. Listing 2-2 illustrates the use of QTVRSetAngularUnits .
You can use the QTVRPtToAngles function to get the pan and tilt angles of a point.
OSErr QTVRPtToAngles (
QTVRInstance qtvr,
Pointpt,
float*panAngle,
float*tiltAngle);
For a panorama, each point in the current view corresponds to a particular pan and tilt angle, with the point at the center of the view corresponding to the panorama's current pan and tilt angle. The QTVRPtToAngles function returns, in the floating-point values pointed to by the panAngle and tiltAngle parameters, the pan and tilt angles of the point specified by the pt parameter.
You can use the QTVRCoordToAngles function to get the pan and tilt angles of a floating-point coordinate in a panorama.
OSErr QTVRCoordToAngles (
QTVRInstance qtvr,
QTVRFloatPoint*coord,
float*panAngle,
float*tiltAngle);
The QTVRCoordToAngles function returns, in the floating-point values pointed to by the panAngle and tiltAngle parameters, the pan and tilt angles of the point specified by the coord parameter. This function is useful for setting up angles in a back buffer imaging procedure; if you know a coordinate in the back buffer, you can call QTVRCoordToAngles to get the corresponding angles.
You can use the QTVRAnglesToCoord function to get a floating-point coordinate determined by a pair of pan and tilt angles.
OSErr QTVRAnglesToCoord (
QTVRInstance qtvr,
floatpanAngle,
floattiltAngle,
QTVRFloatPoint*coord);
The QTVRAnglesToCoord function returns, in the QTVRFloatPoint structure pointed to by the coord parameter, the coordinates of the point in the full panorama of the movie specified by the qtvr parameter that corresponds to the pan and tilt angles specified by the panAngle and tiltAngle parameters.
Use QTVRCoordToAngles to get a pair of pan and tilt angles from a floating-point coordinate.
You can use the QTVRPanToColumn function to get the column number in the object image array that corresponds to a pan angle.
short QTVRPanToColumn (QTVRInstance qtvr, float panAngle);
You can use the QTVRColumnToPan function to get the pan angle that corresponds to a column number in the object image array.
float QTVRColumnToPan (QTVRInstance qtvr, short column);
You can use the QTVRTiltToRow function to get the row number in the object image array that corresponds to a tilt angle.
short QTVRTiltToRow (QTVRInstance qtvr, float tiltAngle);
You can use the QTVRRowToTilt function to get the tilt angle that corresponds to a row number in the object image array.
float QTVRRowToTilt (QTVRInstance qtvr, short row);
You can use the QTVRWrapAndConstrain function to preflight a change in the viewing or control characteristics of an object or panoramic node.
OSErr QTVRWrapAndConstrain (
QTVRInstance qtvr,
short kind,
float value,
float *result);
The QTVRWrapAndConstrain function returns, in the result parameter, the constrained or wrapped value that would result from setting the viewing or control characteristic specified by the kind parameter to the value specified by the value parameter. For example, if the kind parameter is set to kQTVRPan , then QTVRWrapAndConstrain returns the value that would result from calling the QTVRSetPanAngle function with its panAngle parameter set to value . Similarly, you can use QTVRWrapAndConstrain to find the current bounds of the view center. QTVRWrapAndConstrain takes into account the current constraints and wrapping modes of the node specified by the qtvr parameter.
QTVRWrapAndConstrain does not change the current view or other settings of the specified object or panorama.
| Previous | Chapter Contents | Chapter Top | Next |